# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=gnome-online-accounts
pkgver=3.30.0
pkgrel=1
pkgdesc="Single sign-on framework for GNOME"
url="https://wiki.gnome.org/Projects/GnomeOnlineAccounts"
arch=(x86_64)
license=(LGPL)
depends=(webkit2gtk json-glib libnotify rest libsecret krb5 gcr)
makedepends=(gobject-introspection gtk-doc vala git meson)
optdepends=('gvfs-goa: Virtual file systems, e.g. OwnCloud'
            'gvfs-google: Google Drive')
_commit=4542c85743159826e94acb8edb26e235d9732f86  # tags/3.30.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-online-accounts.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build \
    -D lastfm=true \
    -D media_server=true \
    -D todoist=true \
    -D gtk_doc=true \
    -D man=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}

# vim:set ts=2 sw=2 et:
